<template>
  <div class="page-header-index-wide page-header-wrapper-grid-content-main">
    <a-row :gutter="24">
      <a-col :md="24" :lg="5">

        <div class="recommended-books">
          <div class="title">
            <span>📚 图书榜</span>
          </div>
          <ul>
            <li class="book-item">
              <a href="/books/18" target="_blank">
                <img class="book-item-img" src="https://img.golang123.com/upload/img/2018/06/5f111fe1-f6f3-4cb0-a0eb-6cb0458e206a.jpg">
                <div class="book-item-info">
                  <div class="book-item-title">Node.js 调试指南</div>
                  <div>
                    <span class="book-item-buycount">9人已学习</span>
                    <span class="try-read">阅读</span>
                  </div>
                </div>
              </a>
            </li>
            <li class="book-item">
              <a href="/books/43" target="_blank">
                <img class="book-item-img" src="https://img.golang123.com/upload/img/2018/04/cb4e1ba4-9fb5-44f4-9873-50672dc7478e.jpg">
                <div class="book-item-info">
                  <div class="book-item-title">ECMAScript 6 入门</div>
                  <div>
                    <span class="book-item-buycount">5人已学习</span>
                    <span class="try-read">阅读</span>
                  </div>
                </div>
              </a>
            </li>
          </ul>
        </div>

        <div class="recommended-authors">
          <div class="title">
            <span style="color: #333;">🎖️ 作者榜</span>
          </div>
          <ul class="list">
              
            <li class="item">
              <div class="link">
                <a href="/uc/84" target="_blank" class="recommended-avatar" style="background-image: url(https://img.golang123.com/upload/img/2020/3/5b793d41-1f57-427b-864b-576210f5ddfa.png);"></a>
                <div class="user-info">
                  <a href="/uc/84" target="_blank" class="username">超级苦工</a>
                  <a href="/books/37/chapters/872" target="_blank" class="rank">
                    <img :src="`https://cdn.jsdelivr.net/gh/Miazzy/yunwisdoms@v3.0.0/images/${item.level}.svg`">
                  </a>
                  <div class="position"></div>
                  <div class="description">请叫我超级苦工~</div>
                </div>
              </div>
            </li>
              
            <li class="item">
              <div class="link">
                <a href="/uc/44" target="_blank" class="recommended-avatar" style="background-image: url(https://img.golang123.com/upload/img/2018/02/d5efec9d-e8ff-4331-8f2c-70a1f7156be3.jpg);"></a>
                <div class="user-info">
                  <a href="/uc/44" target="_blank" class="username">shen100</a>
                  <a href="/books/37/chapters/872" target="_blank" class="rank">
                    <img :src="`https://cdn.jsdelivr.net/gh/Miazzy/yunwisdoms@v3.0.0/images/${item.level}.svg`">
                  </a>
                  <div class="position">站长 @ 米粒</div>
                  <div class="description">Coding 应当是一生的事业，而不仅仅是 30 岁的青春</div>
                </div>
              </div>
            </li>
            
            <li class="item">
              <div class="link">
                <a href="/uc/62" target="_blank" class="recommended-avatar" style="background-image: url(https://img.golang123.com/upload/img/2020/2/944719f4-b2d5-4daf-8b01-6895e2d9e849.jpg);"></a>
                <div class="user-info">
                  <a href="/uc/62" target="_blank" class="username">coder</a>
                  <a href="/books/37/chapters/872" target="_blank" class="rank">
                    <img src="//raw.githubusercontent.com/Miazzy/yunwisdoms/master/images/lv1.svg">
                  </a>
                  <div class="position"></div>
                  <div class="description"></div>
                </div>
              </div>
            </li>
            
            <li class="item">
              <a @click="$router.push(`/account/authors/index`);" target="_blank" class="more">
                <span>完整榜单</span>
                <i class="fa fa-angle-right" style="font-size: 16px;"></i>
              </a>
            </li>
          </ul>
        </div>

        <div class="sidebar-block related-entry-sidebar-block shadow" st:block="relatedEntrySidebarBlock">
          <div class="block-title">🔥  最新文章</div>

          <div class="block-body">
            <div class="entry-list" :key="index" v-for="(item , index) in newBlogData ">
              <a @click="handleBlogView(item)" target="_blank" rel="" st:name="link" class="item" >
                <div class="entry-title" style="cursor: pointer;"><a>{{item.title}}</a></div>
                <div class="entry-meta-box">
                  <div class="entry-meta"><img src="//cdn.jsdelivr.net/gh/Miazzy/yunwisdoms@v3.0.0/images/zan.svg" class="icon"><span class="count">{{item.star}}</span></div>
                  <div class="entry-meta"><img src="//cdn.jsdelivr.net/gh/Miazzy/yunwisdoms@v3.0.0/images/comment.svg" class="icon"><span class="count">{{item.messages}}</span></div>
                </div>
              </a>
            </div>
          </div>
        </div>

      </a-col>

      <a-col :md="24" :lg="19">
        
        <div class="main-box">
          <div class="major-box">
            <div class="user-info-block">
              <div class="user-info-block-avatar" style="background-image: url(&quot;https://img.golang123.com/upload/img/2020/3/5b793d41-1f57-427b-864b-576210f5ddfa.png&quot;);"></div>
              <div class="info-box">
                <div class="top">
                  <h1 class="username">超级员工
                    <a href="/" target="_blank" class="rank"><img :src="`https://cdn.jsdelivr.net/gh/Miazzy/yunwisdoms@v3.0.0/images/${item.level}.svg`"></a>
                  </h1>
                </div>
                <div class="position"><svg width="21" height="18" viewBox="0 0 21 18" class="position-icon"><g fill="none" fill-rule="evenodd"><path fill="#72777B" d="M3 8.909V6.947a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1V8.92l-6 2.184v-.42c0-.436-.336-.79-.75-.79h-1.5c-.414 0-.75.354-.75.79v.409L3 8.909zm0 .7l6 2.184v.47c0 .436.336.79.75.79h1.5c.414 0 .75-.354.75-.79v-.46l6-2.183V16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9.609zm6.75 1.075h1.5v1.58h-1.5v-1.58z"></path> <path stroke="#72777B" d="M7.5 5.213V4A1.5 1.5 0 0 1 9 2.5h3A1.5 1.5 0 0 1 13.5 4v1.213"></path></g></svg>                            <span class="content"><span></span>
                  <span></span></span>
                </div>
                <div class="intro"><svg width="21" height="18" viewBox="0 0 21 18" class="intro-icon"><path fill="#72777B" fill-rule="evenodd" d="M4 4h13a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm9 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm3 3a3 3 0 0 0-6 0h6zM5 7v1h4V7H5zm0 2.5v1h4v-1H5zM5 12v1h4v-1H5z"></path></svg>                            <span class="content">请叫我超级苦工~</span></div>
              </div>
              <div class="action-box"><button data-v-2e0749a4="" class="subscribe-btn follow-btn" style="background-color: rgb(255, 255, 255); border-color: rgb(108, 189, 69); color: rgb(108, 189, 69); width: 108px; height: 34px; border-radius: 4px; font-size: 16px; font-weight: 500;">关注<!----></button></div>
            </div>

            <div class="list-block">
              <div class="detail-list">
                  <div class="list-header">
                      <div class="header-content">
                          <a href="/uc/84" class="nav-item router-link-exact-active router-link-active active" style="margin-left:10px;">
                              <div class="item-title">文章</div>
                              <div class="item-count">1771</div>
                          </a>
                          <a href="/uc/84/follows" class="nav-item">
                              <div class="item-title">关注</div>
                          </a>
                          <a href="/uc/84/buyhandbooks" class="nav-item">
                              <div class="item-title">小册</div>
                          </a>
                          <a href="/uc/84/collections" class="nav-item">
                              <div class="item-title">收藏集</div>
                          </a>
                      </div>
                  </div>
                  <div class="list-body">
                      <div  class="post-list-box">
                          <div  class="sub-header">
                              <div  class="sub-header-title">文章</div>
                              <div  class="sub-type-box"><a  class="sub-type">热门</a> <a  class="sub-type active">最新</a></div>
                          </div>
                          <div >
                              <div >
                                  <div  class="article-list">
                                      <div   class="article-list-item" style="min-height: 0px;">
                                          <!---->
                                          <div  class="article-content">
                                              <div  class="article-content-and-img">
                                                  <div  class="article-title-summary"><a  href="/p/2749" target="_blank" class="article-title">联合索引在B+树上的存储结构及数据查找方式</a>
                                                      <p  class="article-content">来源: 掘金 原文: 联合索引在B+树上的存储结构及数据查找方式 能坚持别人不能坚持的，才能拥有别人未曾拥有的。 关注编程大道公众号，让我们一同坚持心中所想，一起成长！！ 引言 上一篇文章《MySQL</p>
                                                  </div>
                                                  <!---->
                                              </div>
                                              <div  class="article-meta">
                                                  <div  class="article-view-like"><a  target="_blank" href="/p/2747"><i  class="iconfont ic-list-read"></i> 0</a> <a  href="/uc/84" target="_blank" class="article-username">超级苦工</a>                                                            <a  target="_blank" href="/p/2747#comments"><i  class="iconfont ic-list-comments"></i>0</a>
                                                      <a  href="javascript:void(0)" style="color: rgb(180, 180, 180); cursor: default;"><img  src=""
                                                              style="width: 12px;"> 0
                                                      </a> <span  class="time">2020.03.11 10:49</span></div>
                                                  <!---->
                                              </div>
                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <!---->
                          </div>
                          <!---->
                      </div>
                  </div>
              </div>
            </div>
        </div>
        <div class="minor-box">
            <div class="minor-area-box">
                <div class="user-stat-block">
                    <div class="block-title">个人成就</div>
                    <div class="block-body">
                        <div class="stat-item"><svg width="25" height="26" viewBox="0 0 25 26" class="zan-icon"><g fill="none" fill-rule="evenodd" transform="translate(0 .57)"><ellipse cx="12.5" cy="12.57" fill="#fadcd6" rx="12.5" ry="12.57"></ellipse> <path fill="#e77c6a" d="M8.596 11.238V19H7.033C6.463 19 6 18.465 6 17.807v-5.282c0-.685.483-1.287 1.033-1.287h1.563zm4.275-4.156A1.284 1.284 0 0 1 14.156 6c.885.016 1.412.722 1.595 1.07.334.638.343 1.687.114 2.361-.207.61-.687 1.412-.687 1.412h3.596c.38 0 .733.178.969.488.239.317.318.728.21 1.102l-1.628 5.645a1.245 1.245 0 0 1-1.192.922h-7.068v-7.889c1.624-.336 2.623-2.866 2.806-4.029z"></path></g></svg>                                <span class="content">获得点赞<span class="count">8</span></span>
                        </div>
                        <div class="stat-item"><svg width="25" height="25" viewBox="0 0 25 25" class="article-view-icon"><g fill="none" fill-rule="evenodd"><circle cx="12.5" cy="12.5" r="12.5" fill="#fadcd6"></circle> <path fill="#e77c6a" d="M4 12.5S6.917 7 12.75 7s8.75 5.5 8.75 5.5-2.917 5.5-8.75 5.5S4 12.5 4 12.5zm8.75 2.292c1.208 0 2.188-1.026 2.188-2.292 0-1.266-.98-2.292-2.188-2.292-1.208 0-2.188 1.026-2.188 2.292 0 1.266.98 2.292 2.188 2.292z"></path></g></svg>                                <span class="content">文章被阅读<span class="count">330,209</span></span>
                        </div>
                        <div class="stat-item"><svg width="25" height="25" viewBox="0 0 25 25" class="stat-jp-icon"><g fill="none" fill-rule="evenodd"><circle cx="12.5" cy="12.5" r="12.5" fill="#fadcd6"></circle> <path fill="#e77c6a" d="M16.694 13.516l-3.719 3.055a1.1 1.1 0 0 1-1.412-.013l-2.77-2.362-3.597 2.437a.693.693 0 0 1-.895-.101.649.649 0 0 1-.008-.876l3.68-4.096a1.1 1.1 0 0 1 1.507-.122l2.653 2.135 2.248-2.4-1.34-1.358a.5.5 0 0 1 .327-.85l5.438-.313a.5.5 0 0 1 .528.533l-.368 5.449a.5.5 0 0 1-.855.317l-1.417-1.435z"></path></g></svg>                                <span class="content">米粒值<span class="count">0</span></span>
                        </div>
                    </div>
                </div>
                <div class="follow-block">
                    <a href="/uc/84/follows" class="follow-item">
                        <div class="item-title">关注</div>
                        <div class="item-count">0</div>
                    </a>
                    <a href="/uc/84/followers" class="follow-item">
                        <div class="item-title">粉丝</div>
                        <div class="item-count">4</div>
                    </a>
                </div>
                <div class="more-block">
                    <a href="/uc/84/collections" class="more-item">
                        <div class="item-title">收藏集</div>
                        <div class="item-count">0</div>
                    </a>
                    <a href="/uc/84/followtags" class="more-item">
                        <div class="item-title">关注标签</div>
                        <div class="item-count">0</div>
                    </a>
                    <div class="more-item">
                        <div class="item-title">加入于</div>
                        <div class="item-count"><time class="time">2017-11-06</time></div>
                    </div>
                </div>
            </div>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<script>
import PageLayout from "@/components/page/PageLayout";
import RouteView from "@/components/layouts/RouteView";
import { ArticlePage } from "./page";
import * as manageAPI from "@/api/manage";
import * as storage from "@/utils/storage";
import * as tools from "@/utils/util";

export default {
  components: {
    RouteView,
    PageLayout,
    ArticlePage,
  },
  data() {
    return {
      tags: [],
      postName: "",
      departName: "",
      address: "",
      bio: "",
      tagInputVisible: false,
      tagInputValue: "",
      tabListNoTitle: JSON.parse(`[{"key":"推荐文章","tab":"推荐文章","index":0},{"key":"社会聚焦","tab":"社会聚焦","index":1},{"key":"科学技术","tab":"科学技术","index":2},{"key":"人工智能","tab":"人工智能","index":3},{"key":"诸子百家","tab":"诸子百家","index":4},{"key":"金融管理","tab":"金融管理","index":5},{"key":"建筑工程","tab":"建筑工程","index":6},{"key":"艺术设计","tab":"艺术设计","index":7},{"key":"团队文化","tab":"团队文化","index":8},{"key":"问答交流","tab":"问答交流","index":9},{"key":"前端开发","tab":"前端开发","index":10},{"key":"Android","tab":"Android","index":11},{"key":"IOS开发","tab":"IOS开发","index":12},{"key":"后端开发","tab":"后端开发","index":13}]`),
      fdata: null,
      userinfo: null,
      v_user: null,
      newBlogData:[],
      noTitleKey: "推荐文章"
    };
  },
  computed: {
    userInfo() {
      return this.$store.getters.userInfo;
    }
  },
  async created() {

    //获取用户信息
    this.user = this.userInfo;

    //设置员工岗位信息/部门信息
    try {
      storage.setStore(`system_title_key`,this.noTitleKey);

      this.v_user = await manageAPI.queryUserInfoByView(this.user.username);

      this.postName = this.v_user[0]["post"];
      this.departName = this.v_user[0]["name"];
      this.address = this.v_user[0]["address"];
      this.bio = this.v_user[0]["bio"];
      this.avatar = this.v_user[0]["avatar"];

      this.v_user[0]["tags"] = this.v_user[0]["tags"].replace(/，/g, ",");
      this.tags = this.v_user[0]["tags"].split(",");

      this.newBlogData = await manageAPI.queryBlogInfo(0 , 5);
      
      await window.articleLoadData(window.blogArticle, storage, manageAPI);

    } catch (error) {
      console.log("工作台设置员工岗位信息/部门信息异常：" + error);
    }
  },
  async mounted() {
    await this.handleArticleStyle();
  },
  methods: {
    ...Vuex.mapGetters(["nickname", "avatar"]),
    /**
     * @function 处理切换书签功能
     */
    async handleTabChange(key, type) {
      try {
        this[type] = key;
        storage.setStore(`system_title_key`,key);
        await window.articleLoadData(window.blogArticle, storage, manageAPI);
      } catch (error) {
        console.log(error);
      }
      try {
        var title = this.tabListNoTitle.find((item) => {
          return item.key == key;
        })
        await this.handleArticleStyle(key , title);
      } catch (error) {
        console.log(error);
      }
    },
    /**
     * @function 处理博文预览功能
     */
    async handleBlogView(item) {
      try {
        //标签
        var tags = tools.deNull(item.tags);
        //跳转到博文详情页面
        this.$router.push(
          `/blog/view?id=${item.id}&author=${item.create_by}&tags=${tags}`
        );
      } catch (error) {
        console.log("$router go to error :" + error);
      }
    },
    async handleArticleStyle(key , title , index){
      try {
        index = title.index * 128 * 0.86;
        await this.handleChangeCss(index);
      } catch (error) {
        console.log(error);
      }
      setTimeout(async () => {
        await this.handleChangeCss(index);
      },100);

    },
    async handleChangeCss(index){
      try {
        $('.page-header-wrapper-grid-content-main .ant-tabs-tab-active').css('cssText', 'color: #1890ff; font-weight: 500; border-bottom: 3px solid #1890ff;');
        $('.page-header-wrapper-grid-content-main .ant-tabs-tab').css('cssText', 'margin: 0 14px 0 0;');
        $('.page-header-wrapper-grid-content-main .ant-tabs-ink-bar-animated').css('cssText',`display: block;transform: translate3d(${index}px, 0px, 0px);width: 96px;`);
      } catch (error) {
        console.log(error);
      }
    },
    async handleTagClose(removeTag) {
      const tags = this.tags.filter(tag => tag != removeTag);
      this.tags = tags;

      try {
        //待保存数据
        this.fdata = { tags: tags.toString() };

        //获取用户信息
        this.v_user = await manageAPI.queryUserInfoByView(
          this.userInfo.username
        );

        //此次设置用户岗位
        await manageAPI.patchTableData(
          "sys_user",
          this.v_user[0].id,
          this.fdata
        );

        //属性合并
        this.v_user[0] = Object.assign({}, this.v_user[0], this.fdata);

        //用户信息修改，修改缓存信息
        storage.setStore(
          `system_v_user_info@username$${this.userInfo.username}`,
          this.v_user,
          3600 * 24
        );
      } catch (error) {
        console.log(error);
      }
    },

    async showTagInput() {
      this.tagInputVisible = true;
      this.$nextTick(() => {
        this.$refs.tagInput.focus();
      });
    },

    async handleInputChange(e) {
      this.tagInputValue = e.target.value;
    },

    async handleTagInputConfirm() {
      //获取输入数据
      const inputValue = this.tagInputValue;

      //定义tags内容
      var tags = this.tags;

      try {
        //将新输入的tag加入tags
        if (inputValue && tags.indexOf(inputValue) === -1) {
          tags = [...tags, inputValue];
        }
      } catch (error) {
        console.log(error);
      }

      try {
        //待保存数据
        this.fdata = { tags: tags.toString() };

        //获取用户信息
        this.v_user = await manageAPI.queryUserInfoByView(
          this.userInfo.username
        );

        //此次设置用户岗位
        await manageAPI.patchTableData(
          "sys_user",
          this.v_user[0].id,
          this.fdata
        );

        //属性合并
        this.v_user[0] = Object.assign({}, this.v_user[0], this.fdata);

        //用户信息修改，修改缓存信息
        storage.setStore(
          `system_v_user_info@username$${this.userInfo.username}`,
          this.v_user,
          3600 * 24
        );
      } catch (error) {
        console.log(error);
      }

      try {
        Object.assign(this, {
          tags,
          tagInputVisible: false,
          tagInputValue: ""
        });
      } catch (error) {
        console.log(error);
      }
    }
  }
};
</script>

<style lang="scss" scoped>

.page-header-wrapper-grid-content-main {
  width: 100%;
  height: 100%;
  min-height: 100%;
  transition: 0.3s;

  .main-box {
    width: 960px;
    display: flex;
    margin: 20px auto 32px;
    margin-top: 0;
    margin-left: 0;
    margin-bottom: 32px;
  }

  .major-box {
    flex: 1 1 auto;
    min-width: 0;
  }

  .user-info-block {
    display: flex;
    padding: 30px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
  }

  .user-info-block-avatar {
    display: inline-block;
    position: relative;
    background-position: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    flex: 0 0 auto;
    margin-right: 28px;
    width: 90px;
    height: 90px;
    background-color: #f9f9f9;
    border-radius: 50%;
  }

  .user-info-block .info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    margin-right: 24px;
  }

  .user-info-block .info-box .top {
    display: flex;
    align-items: center;
  }

  .user-info-block .info-box .top .username {
    margin: 0;
    padding: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: #000;
  }

  .rank {
    margin-left: 4px;
    vertical-align: middle;
  }

  .info-box .position {
    margin-top: 12px;
    display: flex;
    font-size: 15px;
    line-height: 1.5;
    color: #72777b;
  }

  .info-box .position-icon {
    flex: 0 0 auto;
    margin-right: 7px;
    height: 22px;
  }

  svg:not(:root) {
    overflow: hidden;
  }

  .info-box .position .content {
    flex: 1 1 auto;
    font-size: 14px;
  }

  .info-box .intro {
    margin-top: 5px;
    display: flex;
    font-size: 15px;
    line-height: 1.5;
    color: #72777b;
  }

  .info-box .intro-icon {
    flex: 0 0 auto;
    margin-right: 7px;
    height: 22px;
  }

  .user-info-block .action-box {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .follow-btn[data-v-2e0749a4] {
    flex: 0 0 auto;
    margin: 0 0 0 12px;
    padding: 0;
    width: 90px;
    height: 30px;
    font-size: 12px;
    color: #92c452;
    background-color: #fff;
    border: 1px solid #92c452;
    border-radius: 2px;
    outline: none;
    transition: background-color .3s,color .3s;
    cursor: pointer;
  }

  .list-block {
    margin-top: 12px;
  }

  .list-header {
    position: relative;
    margin: 0;
    padding: 0;
    height: 50px;
    background-color: #fff;
    border-radius: 2px 2px 0 0;
    border-bottom: 1px solid #ebebeb;
    z-index: 100;
  }

  .list-header .header-content {
    display: flex;
    align-items: center;
    margin: 0 auto;
    height: 100%;
    max-width: 960px;
    white-space: nowrap;
  }

  .list-header .nav-item.active {
    box-shadow: inset 0 -2px 0 #ea6f5a;
  }

  .list-header .nav-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90px;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
  }

  .list-header .nav-item.active .item-count, .list-header .nav-item.active .item-title {
    color: #ea6f5a;
  }

  .list-header .nav-item .item-title {
      font-size: 16px;
      font-weight: 500;
      color: #31445b;
  }

  .list-header .nav-item.active .item-count, .list-header .nav-item.active .item-title {
      color: #ea6f5a;
  }
  .list-header .nav-item .item-count {
      margin-left: 5px;
      font-size: 15px;
      color: #b2bac2;
      line-height: 1;
  }

  .list-header .nav-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90px;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
  }

  .post-list-box, .sub-header {
    background-color: #fff;
  }

  .list-body .sub-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
    height: 50px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(230,230,231,.5);
  }

  .post-list-box, .sub-header {
    background-color: #fff;
  }

  .list-body .sub-header .sub-header-title {
    margin-right: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
  }

  .list-body .sub-header .sub-type-box {
    margin-left: auto;
  }

  .list-body .sub-header .sub-type-box .sub-type:not(:last-child) {
    margin-right: 24px;
  }

  .list-body .sub-header .sub-type-box .sub-type {
      position: relative;
      padding: 12px 0;
      font-size: 14px;
      color: #72777b;
  }

  .list-body .sub-header .sub-type-box .sub-type.active {
    color: #000;
  }

  .article-list {
    width: 100%;
  }

  .article-list-item {
      padding: 20px;
      margin-bottom: 0;
      box-sizing: border-box;
  }
  .article-list-item {
      position: relative;
      width: 100%;
      margin: 0;
      padding: 20px;
      box-sizing: border-box;
      border-bottom: 1px solid #f0f0f0;
      word-wrap: break-word;
  }

  .list-body .sub-header .sub-type-box .sub-type {
      position: relative;
      padding: 12px 0;
      font-size: 14px;
      color: #72777b;
  }

  .article-content {
      margin-bottom: 0;
  }

  .article-content {
      margin: 0 0 8px;
      font-size: 13px;
      line-height: 24px;
      color: #999;
  }

  .article-content-and-img {
    display: flex;
    margin-bottom: 8px;
  }

  .article-title-summary {
    flex: 1;
  }

  .article-title {
    margin-top: 0;
  }

  .article-title:visited {
      color: #909090;
  }

  .article-title {
      font-size: 18px;
      font-weight: 700;
      line-height: 1.5;
      color: #333;
      margin: -7px 0 4px;
      display: inherit;
  }

  .article-content {
    margin-bottom: 0;
  }
  .article-content {
      margin: 0 0 8px;
      font-size: 13px;
      line-height: 24px;
      color: #999;
  }

  .article-meta {
      display: flex;
  }
  .article-meta {
      padding-right: 0!important;
      font-size: 12px;
      font-weight: 400;
      line-height: 20px;
  }

  .article-view-like {
    flex: 1;
  }

  .article-meta a {
    transition: .1s ease-in;
    -webkit-transition: .1s ease-in;
    -moz-transition: .1s ease-in;
    -o-transition: .1s ease-in;
    -ms-transition: .1s ease-in;
    margin-right: 10px;
    color: #b4b4b4;
  }

  .iconfont {
    font-family: iconfont!important;
    font-size: inherit;
    font-style: normal;
    font-weight: 400!important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .article-meta a {
    transition: .1s ease-in;
    -webkit-transition: .1s ease-in;
    -moz-transition: .1s ease-in;
    -o-transition: .1s ease-in;
    -ms-transition: .1s ease-in;
    margin-right: 10px;
    color: #b4b4b4;
  }

  .article-meta span {
    margin-right: 10px;
    color: #b4b4b4;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
  }

  .minor-box {
    flex: 0 0 auto;
    margin-left: 12px;
    width: 240px;
    line-height: 14px;
  }

  .minor-area-box {
    width: 240px;
    transition: all .2s;
  }

  .user-stat-block {
    margin-bottom: 12px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
  }

  .user-stat-block .block-title {
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #31445b;
    border-bottom: 1px solid rgba(230,230,231,.5);
  }

  .user-stat-block .block-body {
    padding: 16px;
  }

  .user-stat-block .block-body .stat-item:not(:last-child) {
    margin-bottom: 10px;
  }

  .user-stat-block .block-body .stat-item {
      display: flex;
      align-items: center;
      font-size: 15px;
      color: #000;
  }

  .user-stat-block .block-body .stat-item .article-view-icon, .user-stat-block .block-body .stat-item .zan-icon , .user-stat-block .block-body .stat-item .stat-jp-icon {
    flex: 0 0 auto;
    margin-right: 14px;
  }

  .user-stat-block .block-body .stat-item .count {
    margin: 0 5px;
    font-weight: 500;
  }

  .follow-block {
    display: flex;
    position: relative;
    margin-bottom: 12px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
  }

  .follow-block .follow-item {
    flex: 1 1 auto;
    padding: 16px 0;
    text-align: center;
    color: #31445b;
    text-decoration: none;
  }

  .follow-block .follow-item .item-title {
    font-size: 16px;
    font-weight: 500;
  }

  .follow-block .follow-item .item-count {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
  }

  .more-block {
    background-color: transparent;
    border-radius: 2px;
  }

  .more-block .more-item {
    display: flex;
    padding: 15px 5px;
    font-size: 15px;
    color: #000;
    border-top: 1px solid rgba(230,230,231,.5);
  }

  .more-block .more-item .item-title {
    margin-right: auto;
  }

  a {
    text-decoration: none;
    cursor: pointer;
    color: #606060;
    color: #333;
  }

  a:hover { 
    text-decoration: none;
    cursor: pointer;
    color: #1890FF;
  }

  .recommended-books {
    padding: 0;
  }

  .sidebar-block:not(.pure) {
    background-color: #fff;
  }

  .sidebar-block {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 2px;
  }

  .sidebar-block:not(.pure) .block-title {
    padding: 1rem 1.3rem;
    font-size: 14px;
    margin-left: 3px;
    color: #333;
    border-bottom: 1px solid hsla(0,0%,58.8%,.1);
  }

  .item {
    display: block;
    cursor: pointer;
    padding: .8rem 1.3rem;
  }

  .entry-title {
    font-size: 1.16rem;
    color: #333;
    cursor: pointer;
  }

  .entry-title:hover { 
    cursor: pointer;
  }

  .entry-meta-box {
    margin-top: .4rem;
  }

  .entry-meta {
    display: inline-block;
    margin-right: 1.5rem;
    font-size: 1.1rem;
    color: #c2c2c2;
  }

  .entry-meta .icon {
    vertical-align: sub;
  }

  .entry-meta .count {
    color: #b2bac2;
    margin-left: .4rem;
  }

  .recommended-authors .title, .recommended-books .title {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid hsla(0,0%,58.8%,.1);
  }

  .recommended-authors, .recommended-books {
      border-radius: 2px;
      overflow: hidden;
      background: #fff;
      margin-bottom: 20px;
      font-size: 13px;
      text-align: center;
      box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
  }

  .recommended-authors .title, .recommended-books .title {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid hsla(0,0%,58.8%,.1);
  }

  .recommended-authors .title span, .recommended-books .title span {
    font-size: 14px;
    color: #333;
  }

  .recommended-authors .item .link {
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }

  .recommended-authors .recommended-avatar {
    display: inline-block;
    position: relative;
    background-position: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #eee;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin-right: 10px;
  }

  .recommended-authors .user-info {
    overflow: hidden;
    text-align: left;
  }

  .recommended-authors .username {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
  }

  .recommended-authors .rank {
    margin-left: 4px;
    vertical-align: middle;
  }

  .recommended-authors .link .description, .recommended-authors .link .position {
    color: #909090;
    font-size: 12px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .recommended-authors .link .description, .recommended-authors .link .position {
    color: #909090;
    font-size: 12px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .recommended-authors .item .more {
    display: block;
    color: #ea6f5a;
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid hsla(0,0%,59.2%,.1);
  }

  .recommended-books .book-item {
    padding: 15px;
    overflow: hidden;
    margin-bottom: 0;
  }

  .recommended-authors, .recommended-books {
      border-radius: 2px;
      overflow: hidden;
      background: #fff;
      margin-bottom: 20px;
      font-size: 13px;
      text-align: center;
      box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
  }

  .recommended-books .book-item a {
    display: block;
    overflow: hidden;
  }

  .recommended-books .book-item-info {
    float: left;
    width: 148px;
    margin-left: 10px;
    text-align: left;
  }

  .recommended-books .book-item-title {
    color: #333;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
  }

  .book-item-buycount {
    color: #878c90;
    float: left;
    height: 20px;
    line-height: 20px;
  }

  .try-read {
    height: 20px;
    line-height: 20px;
    color: #fff;
    font-size: 12px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 2px;
    background-color: #007fff;
    float: right;
  }

  *, :after, :before {
      box-sizing: border-box;
  }

  .recommended-books .book-item-img {
    float: left;
    width: 52px;
    height: 72px;
  }
  
}

</style>